-- GENERATED SPELL FOR [Illidan Stormrage] --


function spell0_32588(pUnit, Event) --@Immolation,Self--
pUnit:FullCastSpellOnTarget(60744,pUnit)
pUnit:RegisterEvent('Sorts_32588', 6000, 1)
end

function spell1_32588(pUnit, Event) --@Pierced Heart,n/a--
pUnit:FullCastSpellOnTarget(61101,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32588', 598, 1)
end

function spell2_32588(pUnit, Event) --@Shear,n/a--
pUnit:FullCastSpellOnTarget(60742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32588', 2000, 1)
end

function Sorts_32588(pUnit, Event)
local choix_sorts_32588 = math.random(0, 2)
if choix_sorts_32588 == 0 then
pUnit:RegisterEvent('spell0_32588', 1, 1)
end
if choix_sorts_32588 == 1 then
pUnit:RegisterEvent('spell1_32588', 1, 1)
end
if choix_sorts_32588 == 2 then
pUnit:RegisterEvent('spell2_32588', 1, 1)
end
end

function mob32588_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32588', math.random(1500, 3000), 1)
end

function mob32588_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32588_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32588_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32588, 1, 'mob32588_Action')
RegisterUnitEvent(32588, 2, 'mob32588_Leave')
RegisterUnitEvent(32588, 3, 'mob32588_Kill')
RegisterUnitEvent(32588, 4, 'mob32588_Die')
